import querystring from 'querystring';

export const getRequest = () => {
  const url = decodeURI(window.location.href);
  let theRequest = {};

  if (url.indexOf("?") !== -1) {
    const str = url.split('?')[1];

    theRequest = querystring.parse(str, '&', '=');
  }
  return theRequest;
}